<?php 
/************************************************************************************************
*   This file is a part of JV-LinkExchanger, a link exchange component for Joomla
*   Copyright (C) 2007-2008  Vijaykumar Niranjan 
*	
*   This program is free software; you can redistribute it and/or modify 
*   it under the terms of the GNU General Public License as published by 
*   the Free Software Foundation; either version 2 of the License, or 
*  (at your option) any later version. 
*
*   This program is distributed in the hope that it will be useful, 
*   but WITHOUT ANY WARRANTY; without even the implied warranty of 
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
*   GNU General Public License for more details. 
*
*   You should have received a copy of the GNU General Public License 
*   along with this program; if not, write to the Free Software 
*   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

* 	JV-LinkExchanger - Link Exchange Component for Joomla 1.0.x
* 	@package JV-LinkExchanger
* 	@file version 1.2.5 RELEASE
* 	@author Vijaykumar Niranjan
* 	@link http://www.jv-extensions.com
* 	@copyright (C) 2007-2008 by Vijaykumar Niranjan
* 	@license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*  	This program is distributed with the hope that it will be useful,
*  	but WITHOUT ANY WARRANTY; without even the implied warranty of
*  	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
***************************************************************************************************/

// ensure this file is being included by a parent file  
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); 

// ensure user has access to this function 
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') || $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_jvlinx'))) { 
    mosRedirect('index2.php', _NOT_AUTH); 
} 

// Include toolbar's HTML class 
require_once($mainframe->getPath('toolbar_html')); 

//echo "toolbar: [$option][$act][$task]<br>";
switch ($task) 
{
	case "viewconfig": 			
	TOOLBAR_jvlinx::showConfigButtons(); 
	break;
	
	case "viewcat": 			
	TOOLBAR_jvlinx::showCategoryButtons(); 
	break;	
	
	case "newcatform":			
	TOOLBAR_jvlinx::showNewCategoryForm(); 
	break;	
	
	case "editcatform": 		
	TOOLBAR_jvlinx::showEditCategoryForm(); 
	break;
	
	case "viewlinks":			
	TOOLBAR_jvlinx::showLinks(); 
	break;	
	
	case "newlinkform":			
	TOOLBAR_jvlinx::showNewLinkForm(); 
	break;	
	
	case "editlinkform":		
	TOOLBAR_jvlinx::showEditLinkForm(); 
	break;
	
	case "movelinkform":		
	TOOLBAR_jvlinx::showMoveLinkForm(); 
	break;
	
	case "rlc_links_exec":		
	TOOLBAR_jvlinx::showRLCLinksMenu(); 
	break;
	
	case "rlc_catlinks_exec":	
	TOOLBAR_jvlinx::showRLCCatLinksMenu(); 
	break;
	
	case "about":				
	case "cancel":	
	default: 					TOOLBAR_jvlinx::showTopLevelButtons(); break;
}
?>